home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / Software / Freeware / Programare / highlight / highlight-W32GUI-2.2-10b-Setup.exe / {app} / src / elementstyle.h < prev    next >
C/C++ Source or Header  |  2004-10-20  |  2KB  |  77 lines

  1. /***************************************************************************
  2.                           elementstyle.h  -  description
  3.                              -------------------
  4.     begin                : Son Nov 10 2002
  5.     copyright            : (C) 2002 by Andre Simon
  6.     email                : andre.simon1@gmx.de
  7.  ***************************************************************************/
  8.  
  9. /***************************************************************************
  10.  *                                                                         *
  11.  *   This program is free software; you can redistribute it and/or modify  *
  12.  *   it under the terms of the GNU General Public License as published by  *
  13.  *   the Free Software Foundation; either version 2 of the License, or     *
  14.  *   (at your option) any later version.                                   *
  15.  *                                                                         *
  16.  ***************************************************************************/
  17.  
  18. #ifndef ELEMENTSTYLE_H
  19. #define ELEMENTSTYLE_H
  20.  
  21. #include <sstream>
  22.  
  23. #include "stylecolour.h"
  24.  
  25. using namespace std;
  26.  
  27. namespace highlight {
  28.  
  29. /** \brief The class stores the basic text formatting properties.
  30.  
  31. * @author Andre Simon
  32. */
  33.  
  34. class ElementStyle {
  35.   public:
  36.  
  37.     /** Constructor
  38.         \param col Style colour
  39.         \param b Bold flag
  40.         \param i Italic flag
  41.         \param u Underline flag */
  42.     ElementStyle(StyleColour col, bool b, bool i, bool u);
  43.  
  44.    /** Constuctor
  45.         \param elementStyleString String with fotmatting information */
  46.     ElementStyle(const string & elementStyleString);
  47.  
  48.     ElementStyle();
  49.  
  50.     ~ElementStyle();
  51.  
  52.    /** initialize object
  53.        \param elementStyleString String which contains formatting attributes
  54.    */
  55.    void set(const string & elementStyleString);
  56.  
  57.    /** \return True if italic */
  58.     bool isItalic() const;
  59.  
  60.    /** \return True if bold */
  61.    bool isBold() const;
  62.  
  63.    /** \return True if underline */
  64.    bool isUnderline() const;
  65.  
  66.    /** \return Element colour */
  67.    StyleColour getColour() const;
  68.  
  69.  private:
  70.     StyleColour colour;
  71.     bool bold, italic, underline;
  72.   };
  73.  
  74. }
  75.  
  76. #endif
  77.